package com.qf;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("cinema")
@Document(indexName = "my_cinema",shards = 2,replicas = 1)
public class Cinema {

  @TableId(type = IdType.AUTO)
  @Id
  private Integer cinemaId;
  @Field(store = true,type = FieldType.Text ,analyzer = "ik_max_word",index = true)
  private String cinemaName;
  @Field(store = true,type = FieldType.Keyword ,index = true)
  private String cinemaAdr;
  @Field(store = true,type = FieldType.Keyword ,index = false)
  private String cinemaImg;
  @Field(store = true,type = FieldType.Keyword ,index = false)
  private String tel;
  @Field(store = true,type = FieldType.Keyword ,index = true)
  private String brandName;
  @TableField(exist = false)
  @Field(store = true,type=FieldType.Integer,index = false)
  private Integer minPrice;
  @TableField(exist = false)
  @Field(store = true,type = FieldType.Keyword ,index = true)
  private List<String> hallType;

}
